﻿Public Class ConvertTime
    Public Shared Function ConvertTime(ByVal seconds As Long) As String
        Dim convSec As Long
        Dim convMin As Long
        Dim convHour As Long
        Dim convDays As Long
        Math.DivRem(seconds, 60, convSec)
        Math.DivRem(seconds, 3600, convMin)
        convMin = convMin/60
        Math.DivRem(seconds, (3600*24), convHour)
        convHour = convHour/3600
        convDays = (seconds/(3600*24))
        Return _
            (convDays.ToString() + " days " + convHour.ToString() + " hours " + convMin.ToString() + " minutes " +
             convSec.ToString() + " seconds ")
    End Function
End Class
